<?php
if ( !defined( "IN_OP_CEN" ) )
{
    exit( "You can't access this file directly...." );
}
$gametype = intval( getvar( "gametype" ) );
$gType = $gametype;
$chkGametype = chkGametype( $gametype );
if ( $chkGametype )
{
    include_once( "class_3d/CheckMode_3d.php" );
    $chk = new CheckMode_3d( $curruser['acl'], 1, $gametype );
    $chk->checkShow3dPage();
    $show3D3S = $chk->show3D3S;
    unset( $chk );
    $ui = new UI_3D( true, "报表管理" );
    $jslink = "<script language=\"JScript.Encode\" src=\"site.js\"></script>".( "<script language=\"VBScript.Encode\" src=\"site.vbs\"></script>" );
    $ui->set( "jslink", $jslink );
    $ui->header();
}
else
{
    $ui = new UI( true, "报表管理" );
}
$cenArr = $g_cen_info;
$tbdList = "";
$dbcen = new DB_CEN();
$i = 0;
foreach ( $cenArr as $key => $val )
{
    ++$i;
    $siteName = $val['siteName'];
    $conStatFlag = $dbcen->chkCidConnect( $key );
    if ( $conStatFlag )
    {
        $conStat = "<font color=\"red\"\">异常-<strong>".$conStatFlag.", 请尽快通知系统管理者</strog></font>";
    }
    else
    {
        $conStat = "<font color=\"green\">正常</font>";
    }
    $classI = $i % 2 + 1;
    $tbdList .= "<tr class='row{$classI}'><td>{$i}</td><td>{$siteName}</td><td>{$conStat}</td></tr>";
}
$tpl = new Template2();
$tpl->load( "main", "list.htm" );
$tpl->set( array( "gametype" => $gametype, "tbdList" => $tbdList, "accname" => $curruser['name'] ) );
$tpl->show( "main" );
$ui->footer();
?>